﻿using Navigant.Infrastructure.RepositoryFramework;
using System.Collections.Generic;
using System.Data;
using Navigant.Infrastructure.DomainBase;

namespace Navigant.Model.PreservationNotices
{
    public interface IPreservationNoticeRepository 
        : IRepository<PreservationNotice>
    {
        IList<PreservationNotice> FindBy(int preservationNoticeTemplateId);
        IList<PreservationNotice> FindAllUnsent(int maxResults);
        IList<PreservationNotice> FindBySite();
        DataTable FindBySiteRaw();
        IList<PreservationNotice> FindBySite(int pageSize, int currentPage, out int itemCount);
        IList<PreservationNotice> FindBySiteAnd(string messageIdentifier);
        IList<PreservationNotice> FindBySiteAnd(int custodianId);
        IList<PreservationNotice> FindBySiteAnd(int preservationNoticeTemplateId,
            int custodianId);
        IList<PreservationNotice> FindByStatus(PreservationNoticeStatus status, int maxResults);
        void AssociateToLogEntry(PreservationNotice notice, SmtpLogEntry logEntry);
        SmtpLogEntry FindSmtpLogEntry(PreservationNotice notice);
        SmtpLogEntry FindSmtpLogEntry(PreservationNotice notice, bool findAllSmtpCodes);
        void UpdateVerificationTries(PreservationNotice notice);
        IList<Attachment> FindAttachments(int preservationNoticeId);
    }
}
